{include file="public/head"/} 
  <body>
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">社区公告管理</a>
        <a><cite>社区公告</cite></a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
    </div>
    <div class="x-body">
      <div class="layui-row">
      </div>
      <xblock>
        <button class="layui-btn" onclick="x_admin_show('发布公告','{:url('admin/Notice/noticeAdd')}',780,700)"><i class="layui-icon"></i>发布公告</button>
        <span class="x-right" style="line-height:40px">共有数据：{$number} 条</span>
      </xblock>
      <table class="layui-table">
        <thead>
          <tr>
            <th style="width:10%">小区名称</th>
            <th style="width:6%">公告名称</th>
            <th>发布内容</th>
            <th style="width:12%">发布时间</th>
            <th style="width:5%">操作</th>
          </tr>
        </thead>
        <tbody>
          {foreach $list as $lis}
          <tr>
            <td>{$lis.community_id}</td>
            <td>{$lis.name}</td>
            <td>{$lis.content}</td>
            <td>{$lis.time}</td>
            <td class="td-manage">
                <!--<a title="修改"  onclick="x_admin_show('修改','{:url('edit')}?id={$lis.id}',800,700)" href="javascript:;">
                  <i class="layui-icon">&#xe642;</i>
                </a>-->
                <a title="删除" onclick="del('{$lis.id}', '{$lis.id}')" href="javascript:;" id="{$lis.id}">
                  <i class="layui-icon">&#xe640;</i>
                </a>
            </td>
          </tr>
          {/foreach}
        </tbody>
      </table>
      <div class="page">
        <div id='page'>
            {$noticelist->render()}
        </div>
      </div>

    </div>
    <script>

      //删除
    function del(id, doc){
      if(confirm('确定要删除吗?')) 
      { 
        var url = "{:url('noticedel')}?id=" + id
        // console.log(url)
        $('#' + doc).attr('href', url)
      } 
      return false; 
    } 
      
    </script>
    <script>var _hmt = _hmt || []; (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
  </body>

</html>